using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

namespace DTO
{
    public class DuocPhamDto
    {
        private int _id;

        public int Id
        {
            get { return _id; }
            set { _id = value; }
        }
        private string _maDuocPham;

        public string MaDuocPham
        {
            get { return _maDuocPham; }
            set { _maDuocPham = value; }
        }
        private string _tenDuocPham;

        public string TenDuocPham
        {
            get { return _tenDuocPham.ToUpper(); }
            set { _tenDuocPham = value.ToUpper(); }
        }
        private string _noiSanXuat;

        public string NoiSanXuat
        {
            get { return _noiSanXuat; }
            set { _noiSanXuat = value; }
        }
        private CongTyNhapHangDto _congTyNhapHang;

        public CongTyNhapHangDto CongTyNhapHang
        {
            get { return _congTyNhapHang; }
            set { _congTyNhapHang = value; }
        }
        private string _soLo;

        public string SoLo
        {
            get { return _soLo; }
            set { _soLo = value; }
        }
        private DonViDuocPhamDto _donViDuocPham;

        public DonViDuocPhamDto DonViDuocPham
        {
            get { return _donViDuocPham; }
            set { _donViDuocPham = value; }
        }
        private LoaiDuocPhamDto _loaiDuocPham;

        public LoaiDuocPhamDto LoaiDuocPham
        {
            get { return _loaiDuocPham; }
            set { _loaiDuocPham = value; }
        }
        private float _giaNhap;

        public float GiaNhap
        {
            get { return _giaNhap; }
            set { _giaNhap = value; }
        }
        private float _giaXuat;

        public float GiaXuat
        {
            get { return _giaXuat; }
            set { _giaXuat = value; }
        }
        private int _soLuongToiThieu;

        public int SoLuongToiThieu
        {
            get { return _soLuongToiThieu; }
            set { _soLuongToiThieu = value; }
        }
        private int _soLuongTonKho;

        public int SoLuongTonKho
        {
            get { return _soLuongTonKho; }
            set { _soLuongTonKho = value; }
        }
        #region table Solo
        private int _soLuongMua;

        public int SoLuongMua
        {
            get { return _soLuongMua; }
            set { _soLuongMua = value; }
        }

        private DateTime _hansudung;
        public  DateTime Hansudung
        {
            get { return _hansudung; }
            set { _hansudung = value; }
        }

        private DateTime _ngaysanxuat;
        public DateTime Ngaysanxuat
        {
            get { return _ngaysanxuat; }
            set { _ngaysanxuat = value; }
        }
        #endregion
        private float _thanhTien;

        public float ThanhTien
        {
            get { return _thanhTien; }
            set { _thanhTien = value; }
        }
        private int _soLuongBan;

        public int SoLuongBan
        {
            get { return _soLuongBan; }
            set { _soLuongBan = value; }
        }

        public string TenCongtynhaphang
        {
            get { return CongTyNhapHang.TenCongTy; }
        }

        public string ThanhTienByNumeric
        {
            get
            {
                return Convert.ToDecimal(ThanhTien).ToString();
            }
        }

        public string HansudungBySTring
        {
            get
            {
                return string.Format("{0:d/M/yyyy}", Hansudung);
            }
        }
    }
}
